addLocalSource

abstract fun addLocalSource(sourceId: String, supportedMimeTypes: List<String>, applyAsset: suspend (Asset) -> DesignBlock?? = null, applyAssetToBlock: suspend (Asset, DesignBlock) -> Unit? = null)

Adds a local asset source. Its ID has to be unique.

Parameters

sourceId

the id of the new local asset source.

supportedMimeTypes

the mime types of assets that are allowed to be added to this local source.

applyAsset

an optional callback that can be used to override the default behavior of applying a given asset result to the active scene.

applyAssetToBlock

an optional callback that can be used to override the default behavior of applying an asset result to a given block.